package com.tbit.main.pojo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author LMY
 * @create 2022-03-30 10:40
 * 区域对账数据日统计
 */
@Data
public class AccountDataDaySta {
    /**
     * 品牌id
     */
    private Integer brandId;
    /**
     * 区域id
     */
    private Integer accountId;
    /**
     * 订单日期
     */
    private String orderDate;
    /**
     * 添加时间
     */
    private String addTime;
    /**
     * 0为金额，1为订单
     */
    private Integer type;
    /**
     * 骑行订单支付
     */
    private BigDecimal orderPayMoney;
    /**
     * 骑行订单支付
     */
    private String orderPayMoneyString;
    /**
     * 骑行订单未支付
     */
    private BigDecimal orderNoPayMoney;
    /**
     * 骑行收入
     */
    private BigDecimal rideIncome;
    /**
     * 骑行收入
     */
    private String rideIncomeString;
    /**
     * 罚款收入
     */
    private BigDecimal fineIncome;
    /**
     * 罚款收入
     */
    private String fineIncomeString;
    /**
     * 骑行订单退款
     */
    private BigDecimal rideOrderRefund;
    /**
     * 骑行订单退款
     */
    private String rideOrderRefundString;
    /**
     * 骑行卡
     */
    private BigDecimal rideCard;
    /**
     * 骑行卡
     */
    private String rideCardString;
    /**
     * 骑行卡订单退款
     */
    private BigDecimal rideCardRefund;
    /**
     * 骑行卡订单退款
     */
    private String rideCardRefundString;
    /**
     * 免押卡
     */
    private BigDecimal depositCard;
    /**
     * 免押卡
     */
    private String depositCardString;
    /**
     * 免押卡订单退款
     */
    private BigDecimal depositCardRefund;
    /**
     * 免押卡订单退款
     */
    private String depositCardRefundString;
    /**
     * 会员卡
     */
    private BigDecimal vipCard;
    /**
     * 会员卡
     */
    private String vipCardString;
    /**
     * 会员卡订单退款
     */
    private BigDecimal vipCardRefund;
    /**
     * 会员卡订单退款
     */
    private String vipCardRefundString;
    /**
     * 优惠券
     */
    private BigDecimal couponOrder;
    /**
     * 优惠券
     */
    private String couponOrderString;
    /**
     * 优惠券订单退款
     */
    private BigDecimal couponOrderRefund;
    /**
     * 优惠券订单退款
     */
    private String couponOrderRefundString;
    /**
     * 总收入
     */
    private BigDecimal income;
    /**
     * 总流水
     */
    private BigDecimal springWater;

    /**
     * 订单时间类型
     */
    private Map<String, List<MonthDateType>> monthTypeReturns;

    public void setOrderPayMoney(Long orderPayMoney) {
        BigDecimal bigDecimal = new BigDecimal(orderPayMoney);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.orderPayMoney = bigDecimal;
        this.orderPayMoneyString = "+" + bigDecimal;
    }

    public void setOrderNoPayMoney(Long orderNoPayMoney) {
        BigDecimal bigDecimal = new BigDecimal(orderNoPayMoney);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.orderNoPayMoney = bigDecimal;
    }

    public void setRideIncome(Long rideIncome) {
        BigDecimal bigDecimal = new BigDecimal(rideIncome);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.rideIncome = bigDecimal;
        this.rideIncomeString = "+" + bigDecimal;
    }

    public void setFineIncome(Long fineIncome) {
        BigDecimal bigDecimal = new BigDecimal(fineIncome);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.fineIncome = bigDecimal;
        this.fineIncomeString = "+" + bigDecimal;
    }

    public void setRideOrderRefund(Long rideOrderRefund) {
        BigDecimal bigDecimal = new BigDecimal(rideOrderRefund);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.rideOrderRefund = bigDecimal;
        this.rideOrderRefundString = "-" + bigDecimal;
    }

    public void setRideCard(Long rideCard) {
        BigDecimal bigDecimal = new BigDecimal(rideCard);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.rideCard = bigDecimal;
        this.rideCardString = "+" + bigDecimal;
    }

    public void setRideCardRefund(Long rideCardRefund) {
        BigDecimal bigDecimal = new BigDecimal(rideCardRefund);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.rideCardRefund = bigDecimal;
        this.rideCardRefundString = "-" + bigDecimal;
    }

    public void setDepositCard(Long depositCard) {
        BigDecimal bigDecimal = new BigDecimal(depositCard);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.depositCard = bigDecimal;
        this.depositCardString = "+" + bigDecimal;
    }

    public void setDepositCardRefund(Long depositCardRefund) {
        BigDecimal bigDecimal = new BigDecimal(depositCardRefund);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.depositCardRefund = bigDecimal;
        this.depositCardRefundString = "-" + bigDecimal;
    }

    public void setVipCard(Long vipCard) {
        BigDecimal bigDecimal = new BigDecimal(vipCard);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.vipCard = bigDecimal;
        this.vipCardString = "+" + bigDecimal;
    }

    public void setVipCardRefund(Long vipCardRefund) {
        BigDecimal bigDecimal = new BigDecimal(vipCardRefund);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.vipCardRefund = bigDecimal;
        this.vipCardRefundString = "-" + bigDecimal;
    }

    public void setCouponOrder(Long couponOrder) {
        BigDecimal bigDecimal = new BigDecimal(couponOrder);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.couponOrder = bigDecimal;
        this.couponOrderString = "+" + bigDecimal;
    }

    public void setCouponOrderRefund(Long couponOrderRefund) {
        BigDecimal bigDecimal = new BigDecimal(couponOrderRefund);
        bigDecimal = bigDecimal.divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);
        this.couponOrderRefund = bigDecimal;
        this.couponOrderRefundString = "-" + bigDecimal;
    }

}
